package nav

/*
#include<stdint.h>
#include<stdbool.h>
extern void nav_dtLocalBoundary_Delete(void * c_this);
extern void nav_dtLocalBoundary_DeleteArray(void * c_this);
extern void* nav_NewdtLocalBoundary();
extern void * nav_dtLocalBoundary_getCenter(void * c_this);
extern void * nav_dtLocalBoundary_getSegment(void * c_this,int i);
extern int nav_dtLocalBoundary_getSegmentCount(void * c_this);
extern void * nav_dtLocalBoundary_IndexArray(void * c_this,long n);
extern bool nav_dtLocalBoundary_isValid(void * c_this,void * navquery,void * filter);
extern void nav_dtLocalBoundary_reset(void * c_this);
extern void nav_dtLocalBoundary_update(void * c_this,unsigned int ref,void * pos,float collisionQueryRange,void * navquery,void * filter);
extern void * nav_NewDtLocalBoundaryPtrArray(long n);

*/
import "C"
import "unsafe"
import "gitee.com/hasika/cgo"

var _ unsafe.Pointer
var _ cgo.NotUsed

type DtLocalBoundaryPtr uintptr

/*
public void Delete()
*/
func (p DtLocalBoundaryPtr) Delete() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtLocalBoundary_Delete(wrap_this)
}

/*
void DeleteArray()
*/
func (p DtLocalBoundaryPtr) DeleteArray() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtLocalBoundary_DeleteArray(wrap_this)
}

/*
public dtLocalBoundary()
*/
func NewDtLocalBoundary() cgo.GoManagedPtr[DtLocalBoundaryPtr] {
	wrap_out := C.nav_NewdtLocalBoundary()
	go_out := cgo.MakePtr[cgo.GoManagedPtr[DtLocalBoundaryPtr]](uintptr(wrap_out))
	return go_out
}

/*
public float const * getCenter() const
*/
func (p DtLocalBoundaryPtr) GetCenter() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtLocalBoundary_getCenter(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
public float const * getSegment(int i) const
*/
func (p DtLocalBoundaryPtr) GetSegment(i int32) *float32 {
	var wrap_this unsafe.Pointer
	var wrap_arg_i C.int
	wrap_this = unsafe.Pointer(p)
	wrap_arg_i = (C.int)(i)
	wrap_out := C.nav_dtLocalBoundary_getSegment(wrap_this, wrap_arg_i)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
public int getSegmentCount() const
*/
func (p DtLocalBoundaryPtr) GetSegmentCount() int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtLocalBoundary_getSegmentCount(wrap_this)
	go_out := int32(wrap_out)
	return go_out
}

/*
dtLocalBoundary * IndexArray(long n)
*/
func (p DtLocalBoundaryPtr) IndexArray(n int) uintptr {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtLocalBoundary_IndexArray(wrap_this, C.long(n))
	go_out := uintptr(wrap_out)
	return go_out
}

/*
public bool isValid(dtNavMeshQuery * navquery, dtQueryFilter const * filter)
*/
func (p DtLocalBoundaryPtr) IsValid(navquery DtNavMeshQueryPtr, filter DtQueryFilterPtr) bool {
	var wrap_this unsafe.Pointer
	var wrap_arg_navquery unsafe.Pointer
	var wrap_arg_filter unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_arg_navquery = (unsafe.Pointer)(navquery)
	wrap_arg_filter = (unsafe.Pointer)(filter)
	wrap_out := C.nav_dtLocalBoundary_isValid(wrap_this, wrap_arg_navquery, wrap_arg_filter)
	go_out := bool(wrap_out)
	return go_out
}

/*
public void reset()
*/
func (p DtLocalBoundaryPtr) Reset() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtLocalBoundary_reset(wrap_this)
}

/*
public void update(dtPolyRef ref, float const * pos, float const collisionQueryRange, dtNavMeshQuery * navquery, dtQueryFilter const * filter)
*/
func (p DtLocalBoundaryPtr) Update(ref uint32, pos *float32, collisionQueryRange float32, navquery DtNavMeshQueryPtr, filter DtQueryFilterPtr) {
	var wrap_this unsafe.Pointer
	var wrap_arg_ref C.uint
	var wrap_arg_pos unsafe.Pointer
	var wrap_arg_collisionQueryRange C.float
	var wrap_arg_navquery unsafe.Pointer
	var wrap_arg_filter unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_arg_ref = (C.uint)(ref)
	wrap_arg_pos = (unsafe.Pointer)(pos)
	wrap_arg_collisionQueryRange = (C.float)(collisionQueryRange)
	wrap_arg_navquery = (unsafe.Pointer)(navquery)
	wrap_arg_filter = (unsafe.Pointer)(filter)
	C.nav_dtLocalBoundary_update(wrap_this, wrap_arg_ref, wrap_arg_pos, wrap_arg_collisionQueryRange, wrap_arg_navquery, wrap_arg_filter)
}

/*
dtLocalBoundary * NewDtLocalBoundaryPtrArray(long n)
*/
func NewDtLocalBoundaryPtrArray(n int) cgo.GoManagedPtr[cgo.Array[DtLocalBoundaryPtr]] {
	wrap_out := C.nav_NewDtLocalBoundaryPtrArray(C.long(n))
	go_out := cgo.MakePtr[cgo.GoManagedPtr[cgo.Array[DtLocalBoundaryPtr]]](uintptr(wrap_out))
	return go_out
}
